{% extends 'base.html' %}
{% load i18n %}

{% block title %}{{ page_user.profile.get_screen_name }}{% endblock %}

{% block head %}
  <link href="{{ STATIC_URL }}css/profile.css" rel="stylesheet">
  <link href="{{ STATIC_URL }}css/feeds.css" rel="stylesheet">
  <script src="{{ STATIC_URL }}js/jquery.bullseye-1.0-min.js"></script>
  <script src="{{ STATIC_URL }}js/feeds.js"></script>
{% endblock head %}

{% block main %}
  <div class="page-header">
    <h1>{{ page_user.profile.get_screen_name }} {% if page_user.get_full_name %}<small>({{ page_user.username }})</small>{% endif %}</h1>
  </div>
  <div class="profile">
    <div class="row">
      <div class="col-md-3 user-profile">
        <img src="{{ page_user.profile.get_picture }}" class="picture">
        <ul>
          {% if page_user.profile.job_title %}
          <li><span class="glyphicon glyphicon-briefcase"></span> {{ page_user.profile.job_title }}</li>
          {% endif %}
          {% if page_user.profile.location %}
          <li><span class="glyphicon glyphicon-map-marker"></span> {{ page_user.profile.location }}</li>
          {% endif %}
          {% if page_user.email %}
          <li><span class="glyphicon glyphicon-envelope"></span> {{ page_user.email }}</li>
          {% endif %}
          {% if page_user.profile.url %}
          <li><span class="glyphicon glyphicon-globe"></span> <a href="{{ page_user.profile.get_url }}" target="_blank">{{ page_user.profile.get_url }}</a></li>
          {% endif %}
        </ul>
      </div>
      <div class="col-md-9">
        <h4>{{ page_user.profile.get_screen_name }} {% trans 'Last Feeds by' %} </h4>
        <div class="stream-update">
          <a href="#"><span class="new-posts"></span> new posts</a>
        </div>
        <ul class="stream">
          {% for feed in feeds %}
            {% include 'feeds/partial_feed.html' with feed=feed %}
          {% endfor %}
        </ul>
        <div class="load">
          <img src="{{ STATIC_URL }}img/loading.gif">
        </div>
        <form method="get" action="{% url 'load' %}" id="load_feed" autocomplete="off">
          <input type="hidden" name="feed_source" id="feed_source" value="{{ page_user.pk }}">
          <input type="hidden" name="from_feed" value="{{ from_feed }}">
          <input type="hidden" name="page" value="{{ page }}">
        </form>
      </div>
    </div>
  </div>
{% endblock main %}
